package com.company;

/**
 * Created by yijy on 2017/5/4.
 */
public abstract class IntGennerator {
    private volatile boolean canceled = false;
    public abstract int next();

    public void cancel(){
        canceled = true;
    }

    public boolean isCanceled(){
        return canceled;
    }
}
